home *** CD-ROM | disk | FTP | other *** search
- Path: bcfreenet.seflin.lib.fl.us!bcfreenet!z007400b
- From: z007400b@bcfreenet.seflin.lib.fl.us (Ralph Silverman)
- Newsgroups: comp.lang.c
- Subject: Re: Passing multidimensional arrays to functions in C
- Date: 24 Jan 1996 20:47:55 GMT
- Organization: SEFLIN Free-Net - Broward
- Message-ID: <4e65tr$619@bcfreenet.seflin.lib.fl.us>
- References: <vijay-2301961215460001@vijay.chinalake.navy.mil>
- NNTP-Posting-Host: bcfreenet.seflin.lib.fl.us
- X-Newsreader: TIN [version 1.2 PL2]
-
- Jim Vijay (vijay@nawc690.chinalake.navy.mil) wrote:
- : The C FAQ (Q's 6.16 thru 6.20) explains how to pass 2D arrays to functions
- : in C. None of the methods shown is as simple or general as languages such
- : as (gasp!) FORTRAN.
-
- : While realizing that I'm inviting flames, and realizing this topic
- : may have been discussed to death in the past (but not in the FAQ),
- : let me ask:
-
- : What would break (or even be damaged) in C if the language allowed
- : one to pass the width of a 2D array (in general, n-1 dimensions of
- : an n dim array) to a function? It should be easy for a compiler to
- : emit code that dynamically depends on these n-1 dimensions.
- : FORTRAN (IV?) at the time of C's birth could do it!
-
- : Please note that I'm not asking how the C language defines and uses multi
- : dimensional array parameters to functions. I would like to know _why_ the
- : current mechanism was chosen - initially (by K&R?) and later by the ANSI
- : C committees.
-
- : Thanks.
-
- --
- *********begin r.s. response**********
-
- "...allowed one to pass..."
- ???
- of course,
- pass them if you want!
-
- *********end r.s. response************
- Ralph Silverman
- z007400b@bcfreenet.seflin.lib.fl.us
-
-